package com.forever.disruptor;

import com.lmax.disruptor.EventHandler;

public class UserEventHandler implements EventHandler<UserEvent> {

	@Override
	public void onEvent(UserEvent event, long sequence, boolean endOfBatch) throws Exception {
		long id = Thread.currentThread().getId();
		String name = Thread.currentThread().getName();
		Thread.sleep(1000);
		System.out.println("ID:" + id + ", Name:" + name + event.getUser().getUserId());
	}
}